package cn.jlkj.demo1.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Worker {

    private String name = "光头强";


//    @Autowired
    Axe axe;

    public Worker(){
        System.out.println("创建了一个工人");
    }

    public void work(){
    System.out.println(name+"使用"+axe+"砍树");
}
}
